port=8686
echo `id -un`
pid=$(netstat -nlp | grep :$port | awk '{print $7}' | awk -F"/" '{ print $1 }');
echo $pid
if [  -n  "$pid"  ];  then
    echo "kill"
    kill  -9  $pid;
fi
export GOPROXY="https://goproxy.cn,direct"
cd /usr/local/src/gitee.com/zylvcxq/mine-info-server
git checkout master
git pull
go build .
chmod 777 mine-info-server
BUILD_ID=dontKillMe
nohup ./mine-info-server > ./log/mine.out 2>&1 &
pid=$(netstat -nlp | grep :$port | awk '{print $7}' | awk -F"/" '{ print $1 }');
if [  -n  "$pid"  ];  then
    echo "success!"
fi
